<?php
class ui_a_default extends ui {
	public function __construct($S, $param) {
		parent::__construct();
		
		if ($_POST['admin'] === 'uReadMeAdmin') {
			$_SESSION['admin'] = 1;
		}
		
		if ($_SESSION['admin']) {
			if ($_GET['reader_id']) {		// 打开reader content的iframe
				$S->assign('data', loadMod('a/reader_iframe', array('reader_id'=>$_GET['reader_id'], 'reader_type'=>$_GET['reader_type'])));
			} else {
				$S->assign('data', loadMod('a/admin'));
			}
		} else {
			$S->assign('data', loadMod('a/login'));
		}
	}
}
?>